//
// Created by ziya on 2021/4/30.
//

#ifndef ZIYA_JVM_CPP_VMTHREAD_H
#define ZIYA_JVM_CPP_VMTHREAD_H

#include "NamedThread.h"
#include "VM_Operation.h"
#include "VMOperationQueue.h"

class VMThread: public NamedThread {

public:
    static void execute(VM_Operation* op);
private:
    // VM_Operation support
    static VM_Operation*     _cur_vm_operation;   // Current VM operation
    static VMOperationQueue* _vm_queue;           // Queue (w/ policy) of VM operations

    void run();
    void loop();
    void evaluate_operation(VM_Operation* op);
};


#endif //ZIYA_JVM_CPP_VMTHREAD_H
